<?php
// 本类由系统自动生成，仅供测试用途
namespace Home\Controller;

class AboutController extends BaseController {
    public function index(){
        
       
       $About =M('About');
       $map['status']=1;
       $art =$About->where($map)->select();
        
       
       if (I('id')){
           
           $map_detail['id']=I('id');
           $art_detail =$About->where($map_detail)->find();
       }else {

           $map_detail['id']=1;
           $art_detail =$About->where($map_detail)->find();
       }
       
       $on=$map_detail['id'];
       
       $this->assign('detail',$art_detail);
       $this->assign('about',$art);
       $this->assign('on',$on);
       $this->display('about');
    }
 
   
   
   
}